/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.biblioteca.service;

import com.biblioteca.beans.Personal;
import com.biblioteca.dao.PersonalDAO;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author Jesus
 */
@Service
public class PersonalService {
    
    @Autowired
    private PersonalDAO iPersonal;
    
    public int Insert(Personal personal) throws Exception{
        return iPersonal.Insert(personal);
    }
    
    public List<Personal> getAll()throws Exception{
        return iPersonal.getAll();
    }
    
    public int actualizar(Personal personal)throws Exception{
        return iPersonal.actualizar(personal);
    }
    
    public int eliminar(int id)throws Exception{
        return iPersonal.eliminar(id);
    }
    
    public Personal getid(int id)throws Exception{
        return iPersonal.getid(id);
    }
    
}
